#!/bin/bash

OK=0
WARN=1

NUM=45000

fstid=$(systemctl status eos@fst|grep "Main PID"|awk '{print $3}')

if [ -n "$fstid" ];then
        num=$(lsof -p $fstid|wc -l)
        if [ $num -gt $NUM ];then
                echo $(hostname)" fst open files: " $num
		exit $WARN
	else
		echo $hostanme" fst open files: ok"
		exit $OK
        fi
fi

